from chapter03.views import my_home_page, hello, current_datetime
from django.conf.urls.defaults import patterns, include, url
from django.contrib import admin
from djbook2.books.views import get_publisher_list
from djbook2.chapter03.views import hours_ahead
from djbook2.chapter04.views import current_datetime_v2, current_datetime_v3, \
    current_datetime_v4, current_datetime_v5, current_datetime_v6, mypage


# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    #chapter03
    (r'^$', my_home_page),
    (r'^hello/$', hello),
    (r'^time/$', current_datetime),
    (r'^time_v2/$', current_datetime_v2),
    (r'^time_v3/$', current_datetime_v3),
    (r'^time_v4/$', current_datetime_v4),
    (r'^time_v5/$', current_datetime_v5),
    (r'^time_v6/$', current_datetime_v6),
    (r'^time/plus/(\d{1,2})/$', hours_ahead),  
    
    (r'^mypage/$', mypage),
    
    #chapter05
    (r'^publishers/$', get_publisher_list),

    # Examples:
    # url(r'^$', 'djbook2.views.home', name='home'),
    # url(r'^djbook2/', include('djbook2.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
     url(r'^admin/', include(admin.site.urls)),
)
